import 'package:json_annotation/json_annotation.dart';

part 'incident_list.g.dart';


@JsonSerializable()
class IncidentList extends Object {

  @JsonKey(name: 'code')
  int code;

  @JsonKey(name: 'message')
  String message;

  @JsonKey(name: 'data')
  List<IncidentItem> incidentList;

  IncidentList(this.code,this.message,this.incidentList);

  factory IncidentList.fromJson(Map<String, dynamic> srcJson) => _$IncidentListFromJson(srcJson);

  Map<String, dynamic> toJson() => _$IncidentListToJson(this);

}


@JsonSerializable()
class IncidentItem extends Object {

  @JsonKey(name: 'investigator')
  String investigator;

  @JsonKey(name: 'type')
  int type;

  @JsonKey(name: 'count')
  String count;

  IncidentItem(this.investigator,this.type,this.count,);

  factory IncidentItem.fromJson(Map<String, dynamic> srcJson) => _$IncidentItemFromJson(srcJson);

  Map<String, dynamic> toJson() => _$IncidentItemToJson(this);

}


